package com.itheima.webaitliasserver.service.impl;

import com.itheima.webaitliasserver.mapper.EmpLogMapper;
import com.itheima.webaitliasserver.pojo.EmpLog;
import com.itheima.webaitliasserver.service.EmpLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @ClassName: xiaoZhang
 * @Description:
 * @Author: Zhang
 * @CreateDate: 2025-07-31 10:57
 */
@Service
public class EmpLogServiceImpl implements EmpLogService {
    @Autowired
    private EmpLogMapper empLogMapper;
    @Override
    @Transactional(propagation = Propagation.REQUIRES_NEW)
    public void insertEmpLog(EmpLog empLog) {
        empLogMapper.insertEmpLogMapper(empLog); // 插入日志
    }
}
